package 字符串;

import java.util.Scanner;

public class 单词的翻转 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        String[] split = str.split("\\s");
        StringBuffer s = new StringBuffer();
        for (int i = split.length-1; i >=0; i--) {
            s.append(split[i]+" ");
        }
        System.out.println(s.toString().trim());
    }
}
